<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script src="js/jquery.js"></script>
	</head>
	<body>
		<button>按钮</button>
		<script type="text/javascript">
			$(function() {
				$('button').click(function() {
					$.ajax({
						type:"get",
						url:"http://127.0.0.1/api/data1.php",
						success: function(data) {
							console.log(data)
						}
					});
				})
			})
		</script>
	</body>
</html>
